package com.winner.strategy_pattern.pay;

import org.springframework.stereotype.Service;

@Service
public class WechatPayServiceImpl extends PaymentStrategy {
    @Override
    public void pay(Long goodsId, double amount) {
        System.out.println("---微信支付---");
        System.out.println("微信支付" + amount + "元");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        PaymentFactory.register("WECHAT_PAY", this);
    }
}
